package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.pojo.Announcement;
import com.example.pojo.Job;
import com.example.service.LaborService;
import com.example.mapper.LaborMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Ansenown
* @description 针对【labor】的中的操作Service
* @createDate 2025-03-05 00:01:10
*/
@Service
public class LaborServiceImpl extends ServiceImpl<LaborMapper, Job>
    implements LaborService {

    @Autowired
    private LaborMapper laborMapper;

    @Override
    public List<Job> getAllJobsByUseridentityfer(int useridentityfer) {
        List<Job> jobs = laborMapper.selectList(new LambdaQueryWrapper<Job>()
                .eq(Job::getUserIdentifier,useridentityfer));

        return jobs;
    }

    @Override
    public Boolean insertJob(Job job) {
        job.setDeleteFlag(1);

        boolean isSuccess = save(job);
        System.out.println("是否成功"+isSuccess);
        if (isSuccess){

        }
        return isSuccess;
    }


}




